Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resize observer loop limit exception #429

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

markov00
Copy link
Member

Summary

In Kibana, we start getting error messages in TSVB describing that the ResizeObserver has reached the loop limit when used together with react-beautiful-dnd library (used by EUI). This fix the issue in Kibana updating the state in the next frame instead of the current one.

fix elastic/kibana#48589

I don't have found the root cause of that. I've found that the error disappear in Kibana in two way:

  • remove all DnD component from TSVB keeping the chart
  • remove the ResizeObserver from Chart, keeping EUI DnD

references:
WICG/resize-observer#38

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • [ ] Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • [ ] This was checked for cross-browser compatibility, including a check against IE11
  • [ ] Proper documentation or storybook story was added for features that require explanation or tutorials
  • ~[ ] Unit tests were updated or added to match the most common scenarios`
  • Each commit follows the convention

In Kibana, we start getting error messages in TSVB describing that the ResizeObserver has reached
the loop limit when used togheter with react-beautiful-dnd library. This fix the issue in Kibana
updating the state on the next frame instead of the current one.

fix elastic/kibana#48589
@markov00 markov00 added the bug Something isn't working label Oct 21, 2019
@markov00 markov00 requested a review from nickofthyme October 21, 2019 13:23
@codecov-io
Copy link

Codecov Report

Merging #429 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #429   +/-   ##
=======================================
  Coverage   97.85%   97.85%           
=======================================
  Files          39       39           
  Lines        2896     2896           
  Branches      701      701           
=======================================
  Hits         2834     2834           
  Misses         55       55           
  Partials        7        7

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e562f15...ea1dbc2. Read the comment docs.

Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🎉 This looks great! I've never done anything like this before, thanks for the lesson!

src/components/chart_resizer.tsx Show resolved Hide resolved
@markov00 markov00 merged commit 5243ef3 into elastic:master Oct 22, 2019
markov00 pushed a commit that referenced this pull request Oct 22, 2019
## [13.5.5](v13.5.4...v13.5.5) (2019-10-22)

### Bug Fixes

* resize observer loop limit exception ([#429](#429)) ([5243ef3](5243ef3))
@markov00
Copy link
Member Author

🎉 This PR is included in version 13.5.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Oct 22, 2019
@markov00 markov00 deleted the fix-resize-observer branch November 25, 2020 11:45
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TSVB is throwing a ResizeObserver loop limit exceeded error
3 participants